import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'business/demand/save',
    method: 'post',
    data,
    headers: {
      "Content-Type": "multipart/from-data;charset=UTF-8"
    }
  })
}

export function del(id) {
  return request({
    url: '/business/demand/delete',
    method: 'post',
    data: id
  })
}

export function edit(data) {
  return request({
    url: '/business/demand/update',
    method: 'post',
    data,
    headers: {
      "Content-Type": "multipart/from-data;charset=UTF-8"
    }
  })
}
export function next(data) {
  return request({
    url: '/business/demand/transfer',
    method: 'post',
    data
  })
}
export function reply(data) {
  return request({
    url: '/business/demand/reply',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'text/plain;;charset=UTF-8'
    }
  })
}
export function finish(data) {
  return request({
    url: '/business/demand/finish/' + data,
    method: 'post',
  })
}

export function get(id) {
  return request({
    url: `/business/demand/info/${id}`,
    method: 'get'
  })
}

export function getAll() {
  return request({
    url: `/business/demand/list`,
    method: 'get'
  })
}



export default { add, edit, del,get, next, reply, finish}

